package com.bw.a1908.uitls.gfit;

public class GiftBean implements Comparable<GiftBean>{

    public String name;
    public String imgUrl;
    public int imgRes;
    public int type;
    //礼物展示时长
    public long showTime;

    //添加到展示队列到时间
    public long createTime;
    //当前展示状态 0 为未展示 1为展示中 2为展示完成销毁
    public int status;

    public GiftBean(int imgRes) {
        this.imgRes = imgRes;
    }

    public GiftBean(long showTime) {
        this.showTime = showTime;
    }

    public GiftBean(String name, long showTime) {
        this.name = name;
        this.showTime = showTime;
    }

    public GiftBean(String name, int imgRes, long showTime) {
        this.name = name;
        this.imgRes = imgRes;
        this.showTime = showTime;
    }

    @Override
    public int compareTo(GiftBean o) {
        return (int) ((createTime+showTime) - (o.createTime+o.showTime));
    }
}
